package com.sxfq.loansupermarket.backsystem.modular.theTest.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(
		value = "ResponseDto",
		description = "相应结果"
)
public class ResponseDto<T> {
	@ApiModelProperty("响应编号('000':请求成功，'001':处理中，'101':执行失败)")
	private String code;
	@ApiModelProperty("响应消息")
	private String mesg;
	@ApiModelProperty("响应结果对象")
	private T data;

	public ResponseDto() {
	}

	public ResponseDto(String code, String mesg, T data) {
		this.code = code;
		this.mesg = mesg;
		this.data = data;
	}

	public static ResponseDto build(String code, String msg) {
		return new ResponseDto(code, msg, (Object)null);
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMesg() {
		return this.mesg;
	}

	public void setMesg(String msg) {
		this.mesg = msg;
	}

	public T getData() {
		return this.data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public boolean equals(Object o) {
		if (o == this) {
			return true;
		} else if (!(o instanceof ResponseDto)) {
			return false;
		} else {
			ResponseDto<?> other = (ResponseDto)o;
			if (!other.canEqual(this)) {
				return false;
			} else {
				label47: {
					Object this$code = this.getCode();
					Object other$code = other.getCode();
					if (this$code == null) {
						if (other$code == null) {
							break label47;
						}
					} else if (this$code.equals(other$code)) {
						break label47;
					}

					return false;
				}

				Object this$mesg = this.getMesg();
				Object other$mesg = other.getMesg();
				if (this$mesg == null) {
					if (other$mesg != null) {
						return false;
					}
				} else if (!this$mesg.equals(other$mesg)) {
					return false;
				}

				Object this$data = this.getData();
				Object other$data = other.getData();
				if (this$data == null) {
					if (other$data != null) {
						return false;
					}
				} else if (!this$data.equals(other$data)) {
					return false;
				}

				return true;
			}
		}
	}

	protected boolean canEqual(Object other) {
		return other instanceof ResponseDto;
	}

	public int hashCode() {
		int result = 1;
		Object $code = this.getCode();
		Object $mesg = this.getMesg();
		result = result * 59 + ($mesg == null ? 0 : $mesg.hashCode());
		Object $data = this.getData();
		result = result * 59 + ($data == null ? 0 : $data.hashCode());
		return result;
	}

	public String toString() {
		return "ResponseDto(code=" + this.getCode() + ", mesg=" + this.getMesg() + ", data=" + this.getData() + ")";
	}
}
